<script setup>
import { useUserStore } from "../store/user"
import { useModalStore } from "../store/modal"
  const user = useUserStore();
  const modal = useModalStore();
</script>
<template>
 <div class="rounded shadow-[0_0_10px_#d7d7d7d] flex items-center" :style="{height:'380px',width:'160px'}">
    <div class="w-40 h-60">
         <div v-if="user.isLogin" class="flex flex-col items-center justify-center h-full">欢饮您:
            <span class="text-orgnge font-bold">{{ user.user.account }}</span>
            <el-button class="text-center bg-#ff6020 cursor-pointer rounded leading-2" @click="user.logout">
            退出登录
           </el-button>
          </div>
          <div v-else class="flex flex-col items-center justify-center h-full">
            <img src="https://file.cdn.xdclass.net/images/new.webp" class="cursor-pointer mb-1 mt-0 w-50 h-50"/>
            <el-button @click="model.switchLoginVisible()"
            class="text-center bg-#ff6020 cursor-pointer rounded-71px w-130 h-24px text-12px p2 leading-2">
            登录/注册</el-button>
          </div>
    </div>
 </div>
</template>